/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.jbr.simplefoodplan.rest.impl;

import com.sun.jersey.api.Responses;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;

/**
 *
 * @author jbr
 */
public class NotAllowedException extends WebApplicationException {

    public NotAllowedException() {
        super(Responses.methodNotAllowed().build());
    }

    public NotAllowedException(String message) {
        super(Response.status(Responses.METHOD_NOT_ALLOWED).
                  entity(message).type("text/plain").build());
        System.out.println("Method not allowed: " + message);
    }

}
